//
//  FDConfirmButton.m
//  fruitsDealers
//
//  Created by sgone-1 on 16/3/8.
//  Copyright © 2016年 com.sgone. All rights reserved.
//

#import "FDConfirmButton.h"
#import "Common.h"
@implementation FDConfirmButton

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        
        [self addTarget:self action:@selector(confirmClick) forControlEvents:UIControlEventTouchUpInside];
        
        self.titleLabel.font = [UIFont systemFontOfSize:14.0f / FDLaOt];
        [self setTintColor:[UIColor whiteColor]];
        [self setBackgroundColor:FDMainColorAla];
    }
    return self;
}

+ (instancetype)initWithFrame:(CGRect)frame {
    
    return [[self alloc] initWithFrame:frame];
}

- (void)confirmClick {
    
    if ([self.delegate respondsToSelector:@selector(confirmClick)]) {
        
        [self.delegate confirmClick];
    }
}

@end
